Technical Q&A QA1002
FWSendSoftwareInterrupt vs. SendSoftwareInterrupt


Q: What is the difference between SendSoftwareInterrupt and FWSendSoftwareInterrupt?

A: A: SendSoftwareInterrupt in DriverServicesLib doesn't actually do anything except immediately call the associated interrupt handler.

FWSendSoftwareInterrupt depends on a patch to WaitNextEvent for it's behavior. In general when you call FWSendSoftwareInterrupt, the handler installed using FWCreateSoftwareInterrupt gets run the next time WaitNextEvent is called. When you call FWCreateSoftwareInterrupt one of the parameters is a TaskID. FWSendSoftwareInterrupt tries to make sure that the TaskID of the software interrupt matches the TaskID of the current process according to the Process Manager. If you don't care what the current process is when you get called (as would likely be the case for a driver) pass in kInvalidID instead of FWCurrentTaskID when you call FWCreateSoftwareInterrupt. This way the software interrupt will get called the next time WaitNextEvent gets called after you call FWSendSoftwareInterrupt.


[Feb 13 2002]


Developer Documentation | Technical Notes | Development Kits | Sample Code